//Copyright 2012 Trevin Liberty
//GNU GPL v3
//Author: Trevin Liberty
//
//Base Class: Entity
//Used to implement an Swordsmen Entity

#ifndef SWORDSMEN_H
#define SWORDSMEN_H

#include <allegro5\allegro5.h>

#include "Entity.h"
#include "States\StateMachine.h"
#include "States\SwordsmenOwnedStates.h"
#include "Animator.h"
#include "../Structs.h"


//SEE: Top of file.
class Swordsmen : public Entity {
private:
	StateMachine<Swordsmen>* stateMachine;

	static Slide* slideWalking;
	static Slide* slideLooking;
	static Slide* slideAttacking;

	static Slide* slideWalkingComp;
	static Slide* slideLookingComp;
	static Slide* slideAttackingComp;
	
	//Point<int> guardPoint;
	//bool givenTarget;

	Animator animator;

	void loadImages();

public:
	//SEE: Entity.h
	Swordsmen(int maxHealth, Map* map, AStar* aStar);

	//Returns the Archers StateMachine
	StateMachine<Swordsmen>* getStateMachine() {return stateMachine;}

	//TODO: Fix to make swordsmen from running to far after a target.
		//void setGuardPoint(Point<int> pos) {guardPoint = pos;}
		//bool outOfRangeGuardPoint();
		//Point<int> getGuardPoint() const {return guardPoint;}
		//void setGivenTarget(bool t) {givenTarget = t;}
		//bool wasGivenTarget() {return givenTarget;}

	//Used to update the Archer
	void update();

	//Used to draw the Archer
	void draw(Point<float> cameraPos);

	//SEE: Entity.h
	void deleteImages();
};

#endif